<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <h:body>
        <div class="change_pass">
            <f:view>
                <h:form>
                    <h3 style="color: #3F8AAC; margin:  10px 0 10px 25px;">
                        Enter the keyword :    <h:inputText style="font-family: Arial;font-size: 13px;"  value="#{applicantManagedBean.name}"
                                                            valueChangeListener="#{applicantManagedBean.findIDApplicant}">
                            <f:ajax  event="keyup" render="ajaxOutput" />
                        </h:inputText> &nbsp;
                        <h:selectOneMenu style="font-family: Arial;font-size: 13px;"   value="#{applicantManagedBean.select}" valueChangeListener="#{applicantManagedBean.setQuery}">
                            <f:ajax event="change"/>
                            <f:selectItem itemLabel="---Select---" itemValue="0" ></f:selectItem>
                            <f:selectItem itemLabel="Applicant ID" itemValue="1" ></f:selectItem>
                            <f:selectItem itemLabel="Applicant Name" itemValue="2"></f:selectItem>
                        </h:selectOneMenu>
                    </h3>

                    <h:dataTable style="text-align: center;" columnClasses="bd_td1,bd_td,bd_td,bd_td,bd_td,bd_td" cellpadding="3" cellspacing="1" border="0" styleClass="joblist" rowClasses="list_footer_cell" headerClass="list_header_cell"  id="ajaxOutput" value="#{interviewsManagedBean.listApplicant}" var="item">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="ApplicantName"/>
                            </f:facet>
                            <h:commandLink action="#{applicantManagedBean.applicantDetails(item)}" value="#{item.applicantName}" >
                                <f:setPropertyActionListener value="#{item}" target="#{applicantManagedBean.applicant}"  />
                            </h:commandLink>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="AppPhone"/>
                            </f:facet>
                                <h:outputText value="${item.appPhone}" />
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="AppEmail"/>
                            </f:facet>
                                <h:outputText value="${item.appEmail}" />
                        </h:column>

                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="Doc"/>
                            </f:facet>
                            <h:outputText value="#{item.doc}">
                                <f:convertDateTime pattern="MM/dd/yyyy" />
                            </h:outputText>
                        </h:column>
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="AppStatus"/>
                            </f:facet>
                            <h:selectOneMenu  disabled="true" value="${item.appStatus}">
                                <f:selectItem  itemLabel="---Select---" itemValue="0" ></f:selectItem>
                                <f:selectItem itemLabel="Not in Process" itemValue="1" ></f:selectItem>
                                <f:selectItem itemLabel="In Process" itemValue="2"></f:selectItem>
                                <f:selectItem itemLabel="Hired" itemValue="3"></f:selectItem>
                                <f:selectItem itemLabel="Banned" itemValue="4"></f:selectItem>
                            </h:selectOneMenu>
                        </h:column>
                    </h:dataTable>

                </h:form>
            </f:view>
        </div>
    </h:body>
</html>

